package com.baidu.customview;

import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.View;
import android.widget.TextView;

import com.baidu.customview.activity.BaseActivity;
import com.baidu.customview.utils.MetricsUtils;
import com.baidu.customview.widget.viewgroup.SVRecordView;


public class MainActivity extends BaseActivity implements View.OnClickListener, TextWatcher {


    private com.baidu.customview.widget.AnimListView lv;
    private com.baidu.customview.widget.progressbar.AddProgress mProgress;
    private com.baidu.customview.widget.AntiTerroristView sv;
    private com.baidu.customview.widget.viewgroup.SVRecordView svRv;
    private android.widget.TextView mTv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.widget_sv_record);
        this.mTv = (TextView) findViewById(R.id.mTv);
        DisplayMetrics metrics = MetricsUtils.winMetrics(this);
        float scale = metrics.density;
        float size = 10;
        this.mTv.setTextSize(TypedValue.COMPLEX_UNIT_PX, scale * size);
        this.svRv = (SVRecordView) findViewById(R.id.svRv);
        this.svRv.setText("2016-1-14", "xihu", "20:23:13", "1 time");
        //init();
    }

//    private void init() {
//        this.sv = (AntiTerroristView) findViewById(R.id.sv);
//        //this.mProgress = (AddProgress) findViewById(R.id.mProgress);
//        this.mProgress.start();
//        this.lv = (AnimListView) findViewById(R.id.lv);
//        ArrayList<RobotBean> data = new ArrayList<>();
//        for (int i = 0; i < 20; i++) {
//            data.add(new RobotBean(R.mipmap.ic_launcher, "robot----" + i));
//        }
//        RobotItemAdapter adapter = new RobotItemAdapter(data, this);
//        this.lv.setAdapter(adapter);
//    }


    @Override
    public void onClick(View v) {

    }

    @Override
    public void beforeTextChanged(CharSequence s, int start, int count, int after) {

    }

    @Override
    public void onTextChanged(CharSequence s, int start, int before, int count) {

    }

    @Override
    public void afterTextChanged(Editable s) {
    }
}
